<html>
<head>
<title>Demo upload clip</title>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="javascript/upload.js"></script>
<script type="text/javascript">
 function getFile(){
   document.getElementById("upfile").click();
 }
 function sub(obj){ 	        
	 alert(obj.value);
    var myTextField = document.getElementById('myText');	
	myTextField.value = obj.value;	     
  }
</script>
</head>
<body>
	<form action="cgi-bin/upload.cgi" method='post' enctype="multipart/form-data">
		<h1>Upload clip</h1>		
	<!-- 	<p>
			<input type='text' id='myText' name="photo" style="width:400px;"/>		
			<img alt="select" src="images/select.jpg" onClick="getFile()" />
		</p>
		<p>
			<input type="file" style="display: none" id="upfile" onchange="sub(this)" />
		</p>

		 -->
		<p> From client: <input style="width:500px" type="file" name="photo" multiple accept="image/*" /> </p>
		<p> From url: <input type='text' id='txtUrl' name="photoUrl" style="width:500px;"/> </p>
		<p><input type="submit" name="Submit" value="Submit Form"/> </p> 
		
		<?php 
		if(count($_GET) > 0 && !empty($_GET["imgName"])){				
		?>
			<img alt="test" src="upload/<?php echo $_GET["imgName"]?>"/>
		<?php
			} 
		?>		
	</form>
</body>